/**
 * 
 */
package com.shine.icis.dto;

import java.text.DecimalFormat;

/**
 * 对应A13信息
 * 
 * @author zuohp
 */
public class SeStock {

	private DecimalFormat doubleFormat = new DecimalFormat("##,##0.00");
	private String seatNo;//席位号
	private Integer branchNo;//营业部编号
	private String exchangeType;//交易类别
	private String taCode;//TA代码
	private String stockAccount;// 证券账号
	private String stockCode;//证券代码
	private Integer fundAccount;//资金账号
	//private String holderName;//客户姓名
	private double amount;// 证券余额
	private String srcTable;// 数据来源
	private Integer busiDate;//业务日期
	
	public String getSeatNo(){
		return seatNo;
	}
	public void setSeatNo(String seatNo) {
		this.seatNo = seatNo;
	}
	public int getBranchNo() {
		return branchNo;
	}
	public void setBranchNo(Integer branchNo) {
		this.branchNo = branchNo;
	}
	//交易类别
	public String getExchangeType() {
		return exchangeType;
	}
	public void setExchangeType(String exchangeType) {
		this.exchangeType = exchangeType;
	}
	public String getTaCode(){
		return taCode;
	}
	public void setTaCode(String taCode) {
		this.taCode = taCode;
	}
	public String getStockAccount() {
		return stockAccount;
	}
	public void setStockAccount(String stockAccount) {
		this.stockAccount = stockAccount;
	}
	
	public String getStockCode() {
		return stockCode;
	}
	public void setStockCode(String stockCode) {
		this.stockCode = stockCode;
	}
	public int getFundAccount() {
		return fundAccount;
	}
	public void setFundAccount(Integer fundAccount) {
		this.fundAccount = fundAccount;
	}
	/*
	public String getHolderName(){
		return holderName;
	}
	public void setHolderName(String holderName) {
		this.holderName = holderName;
	}
	*/
	public double getAmount() {
		return amount;
	}
	public String getAmountNote() {
		return doubleFormat.format(amount);
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}

	public String getSrcTable() {
		return srcTable;
	}
	public void setSrcTable(String srcTable) {
		this.srcTable = srcTable;
	}
	
	public int getBusiDate() {
		return busiDate;
	}
	public void setBusiDate(Integer busiDate) {
		this.busiDate = busiDate;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((stockAccount == null) ? 0 : stockAccount.hashCode());
		result = prime * result
				+ ((stockCode == null) ? 0 : stockCode.hashCode());
		result = prime * result
				+ ((srcTable == null) ? 0 : srcTable.hashCode());
		result = prime * result
				+ busiDate;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final SeStock other = (SeStock) obj;
		if (stockAccount != null && stockAccount.equals(other.getStockAccount())
				&&stockCode != null && stockCode.equals(other.getStockCode()) 
				&& amount == other.getAmount() 
				&& srcTable != null && srcTable.equals(other.getSrcTable()) 
				&& busiDate == other.getBusiDate()) {
			return true;
		}
		return false;
	}
}
